<cfcomponent extends="assets.csac.com.Base">

	<cfscript>
        import assets.csac.com.service.TrackingService;
		this.service = new TrackingService();
	</cfscript>

	<cffunction name="get" output="false" access="remote" returntype="assets.csac.com.bo.Tracking">
		<cfreturn this.service.get(argumentCollection = arguments) />
	</cffunction>
	
	<cffunction name="query" output="false" access="public" returntype="query">
		<cfreturn this.service.read(argumentCollection = arguments) />
	</cffunction>
	
	<cffunction name="save" output="false" access="public" returntype="any">
        <cfscript>
			var tracking = "";
			var tracking_ = this.service.get(Tracking_ID = arguments.Tracking_ID);
			if (IsInstanceOf(arguments[1], "assets.csac.com.bo.Tracking")) {
				tracking = arguments[1];
			} else {
				var args = {};
				StructAppend(args, arguments);
				args.obj = Duplicate(tracking_);
				tracking = this.service.load(argumentCollection = args);
			}
			tracking.setTracking_ID(this.service.save(tracking));
			return tracking;
        </cfscript>
	</cffunction>
	
	<cffunction name="delete" output="false" access="public" returntype="boolean">
		<cfreturn this.service.destroy(argumentCollection = arguments) />
	</cffunction>
	
</cfcomponent>